<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
	var i = 5;
	var t;
	function showTimer() {
		if (i == 0) {
			// 如果秒数为 0 的话，清楚 t ，防止一直调用函数，对于反应慢的机器可能实现不了跳转到www.baidu.com的效果，所以要清楚掉 setInterval()
			window.location.href = "index.action";
			window.clearInterval(t);
		} else {
			i = i - 1;
			// 秒数减少并插入 timer 层中
			document.getElementById("timer").innerHTML = "<center><font color='red'>内容不存在，"
					+ i + "秒后跳转到<a href='index.action'>首页</a>...</font></center>";
		}
	}
	// 每隔一秒钟调用一次函数 showTimer()
	t = window.setInterval(showTimer, 1000);
</script>
<title>资源不存在</title>
</head>
<body>
<div id="timer">
<center><font color="red">内容不存在，5秒后跳转到<a href="/${pageContext.request.contextPath}index.action">首页</a>...</font></center>
</div>
</body>
</html>